home *** CD-ROM | disk | FTP | other *** search
- on update_all
- global board_list
- repeat with i in board_list
- update_me(i)
- end repeat
- end
-
- on shuffle_pieces
- global board_list
- set temp to []
- repeat with n = 16 down to 1
- set t to random(n)
- set i to getAt(board_list, t)
- deleteOne(board_list, i)
- add(temp, i)
- end repeat
- set board_list to duplicate(temp)
- end
-
- on check_if_right
- global complete_list, board_list, can_I_win
- if can_I_win = 0 then
- return
- end if
- repeat with n = 1 to 16
- if not (getAt(board_list, n) = getAt(complete_list, n)) then
- return
- end if
- end repeat
- go("win")
- end
-
- on shuffle
- global can_I_win
- set can_I_win to 1
- puppetSound(1, "shuffle3")
- repeat while soundBusy(1)
- shuffle_pieces()
- update_all()
- updateStage()
- end repeat
- end
-
- on change_all
- global board_list
- puppetSound(2, "finish")
- repeat with i in board_list
- change_state(i)
- end repeat
- end
-